package com.kernel.entity;

import lombok.Data;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/****************************************
 * @name Person
 * @description test
 * @author 黄彬恒
 * @since 2018/8/29
 ***************************************/
@Data
@Component
public class Person {
    private String name;
    private int age;

    private Hand h;

    @Resource
    private Say s;

    @Resource(name = "hand")
    public void setH(Hand h) {
        this.h = h;
    }

    public void say() {
        System.out.println("hello world");
    }

    public void test() {
        h.hand();
        s.say();
    }
}
